﻿using System;
using System.Collections.Generic;
using BusinessObjects.Entities;
using Data.DataAccessObjects.Base;

namespace Data.DataAccessObjects
{
    public class PersonDao : DaoBase<PersonEntity, int>, IPersonDao
    {
        public IList<PersonEntity> GetByBirthDate(DateTime birthDate)
        {
            return GetBy("Birthdate", birthDate);
        }

        public IList<PersonEntity> GetByCity(string city)
        {
            return GetBy("Address", "City", city);
        }

        public IList<PersonEntity> GetByState(string state)
        {
            return GetBy("Address", "State", state);
        }

        public IList<PersonEntity> GetByZip(string zip)
        {
            return GetBy("Address", "Zip", zip);
        }
    }
}